﻿using System;
using System.Collections.Generic;

using System.Text;
using Estimate.Common.Entity;
using Estimate.Common.Repository;

namespace Estimate.OldSemiCompare.Transfer
{
    public class CityForeTransfer : BaseForeTransfer
    {
        public CityForeTransfer(string oldConnectionString, string newConnectionString)
            : base(oldConnectionString, newConnectionString)
        {

        }

        public override string GetTableName()
        {
            return "CityFore";
        }

        protected override ForeRepository getRepository(string table)
        {
            if (table.IndexOf("Normal") != -1)
            {
                return ForeRepositoryFactory.NormalCityForeRepository(_newConnectionString);
            }
            else if (table.IndexOf("Zyt") != -1)
            {
                return ForeRepositoryFactory.ZytCityForeRepository(_newConnectionString);
            }
            else
            {
                //如果是导 ForecastEstimate
                //return ForeRepositoryFactory.NormalCityForeRepository(_newConnectionString);
                //如果是导 TestEstimate
                return ForeRepositoryFactory.SdxCityForeRepository(_newConnectionString);
            }
        }
    }
}
